<%@include file="_header.jsp"%>

<title>32Learn</title>
</head>
<body>
    <c:choose>
        <c:when test="${userLevel != 2 && userLevel != 3}">
            <%@include file="errorPage.jsp"%>
        </c:when><c:otherwise>
            <%@include file="_menu.jsp"%>

            <div class="sidebar">

                <div class="redbar"><a href="#"><div id="bar-textcontent">${inhoud.adminHomeT5}</div></a>
                </div>
                <div id="sidescreen">

                    <ul class="thumbnails">
                        <li class="span4">
                            <div class="thumbnail">
                                <h3>${inhoud.adminHomeT5}</h3>
                                <img src="icons/view_courses.png" alt="">

                                <p>${inhoud.editCourseT}</p>
                            </div>
                        </li>
                    </ul>


                </div>



            </div>

            <div class="wrappermain">


                <div class="digitalclass">
                    <div id="subheader"> <div id="bar-textcontent">${inhoud.courseList}</div> </div>






                    <div class="main-digital">
                        <table class="table" >
                            <tr>
                                <td>${inhoud.changeCourseT}</td>
                                <td>${inhoud.changeCourseT3}</td>
                                <td>${inhoud.changeCourseT2}</td>
                                <td>${inhoud.changeCourseT4}</td>
                            </tr>

                            <c:forEach var="courseinfo" items="${coursesUitSessie}">    
                                <c:set var="course" value="${courseinfo}" />
                                <tr>
                                    <td>
                                        ${courseinfo.courseName}
                                    </td>

                                    <td>
                                        ${courseinfo.courseLanguage}
                                    </td>
                                    <td>
                                        ${courseinfo.courseDescription}
                                    </td>
                                    <td>
                                        <%
                                            HttpSession sessie = request.getSession();
                                            InhoudBean1 inhoudBean1 = (InhoudBean1) sessie.getAttribute("inhoud");
                                            Course course = (Course) pageContext.getAttribute("course");
                                            String price = inhoudBean1.getAmount(Double.parseDouble(course.getPrice()));
                                        %>
                                        ${inhoud.currencySymbol}<%= price%>
                                    </td>
                                    <td>
                                        <c:choose>
                                            <c:when test="${userLevel > 1}">
                                                <a href="change_course?courseid=${courseinfo.courseID}"><img src="icons/next_button.png"></a>
                                                </c:when>
                                            </c:choose>
                                    </td>
                                </tr>
                            </c:forEach>  
                        </table>


                    </div>
                </div>
            </div>
        </c:otherwise></c:choose>
</body>
</html>
